<template>
  <main>
    <van-image width="100" height="100" :src="png" />
    <van-image :src="banner" />
  </main>
</template>

<script lang="ts">
import { defineComponent, onBeforeMount, reactive, toRefs } from "vue";

export default defineComponent({
  setup() {
    const state = reactive({
      png: new URL("../assets/images/WechatIMG358.png", import.meta.url).href,
      banner: new URL(
        "../assets/images/1221690959649_.pic_hd.jpg",
        import.meta.url
      ).href,
    });
    console.log("home page.");

    // onBeforeMount(() => {
    //   loadMenu();
    // });

    // const loadMenu = async () => {
    //   const res = await http._get(`http://api.jutuike.com/union/act_list`, {
    //     apikey: key.jtk,
    //     pageSize: 100,
    //   });
    //   console.log(res);
    // };

    return {
      ...toRefs(state),
    };
  },
});
</script>
